<?php
/**
 * Date: 2024.8
 * Author: kahn
 * 插件工具类
 */
namespace plugins;

trait Plugin
{
    protected function getRoute(): string
    {
        $baseUri = $_SERVER['REQUEST_URI'];
        return strtolower(trim($baseUri, '/'));
    }

    protected function getMethod(): string
    {
        return strtoupper($_SERVER['REQUEST_METHOD']);
    }
}